.class public Lcom/brixd/niceapp/community/adapter/CommunityAppAdapter;
.super Landroid/widget/BaseAdapter;
.source "CommunityAppAdapter.java"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/brixd/niceapp/community/adapter/CommunityAppAdapter$ViewHolder;,
        Lcom/brixd/niceapp/community/adapter/CommunityAppAdapter$OnItemClickListener;
    }
.end annotation


# instance fields
.field private mAvatarOptions:Lcom/nostra13/universalimageloader/core/DisplayImageOptions;

.field private mContext:Landroid/content/Context;

.field private mIconOptions:Lcom/nostra13/universalimageloader/core/DisplayImageOptions;

.field private mImageLoader:Lcom/nostra13/universalimageloader/core/ImageLoader;

.field private mIsHideUserInfo:Z

.field private mMetrics:Landroid/util/DisplayMetrics;

.field private mModels:Ljava/util/ArrayList;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/ArrayList",
            "<",
            "Lcom/brixd/niceapp/community/model/CommunityAppModel;",
            ">;"
        }
    .end annotation
.end field

.field private mOnItemClickListener:Lcom/brixd/niceapp/community/adapter/CommunityAppAdapter$OnItemClickListener;

.field private mOptions:Lcom/nostra13/universalimageloader/core/DisplayImageOptions;


# direct methods
.method public constructor <init>(Landroid/content/Context;Ljava/util/ArrayList;)V
    .registers 7
    .param p1, "context"    # Landroid/content/Context;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Landroid/content/Context;",
            "Ljava/util/ArrayList",
            "<",
            "Lcom/brixd/niceapp/community/model/CommunityAppModel;",
            ">;)V"
        }
    .end annotation

    .prologue
    .local p2, "models":Ljava/util/ArrayList;, "Ljava/util/ArrayList<Lcom/brixd/niceapp/community/model/CommunityAppModel;>;"
    const v3, 0x7f02010e

    const v2, 0x7f0200d8

    const/4 v1, 0x1

    .line 38
    invoke-direct {p0}, Landroid/widget/BaseAdapter;-><init>()V

    .line 36
    const/4 v0, 0x0

    iput-boolean v0, p0, Lcom/brixd/niceapp/community/adapter/CommunityAppAdapter;->mIsHideUserInfo:Z

    .line 39
    iput-object p1, p0, Lcom/brixd/niceapp/community/adapter/CommunityAppAdapter;->mContext:Landroid/content/Context;

    .line 40
    iput-object p2, p0, Lcom/brixd/niceapp/community/adapter/CommunityAppAdapter;->mModels:Ljava/util/ArrayList;

    .line 41
    invoke-virtual {p1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v0

    invoke-virtual {v0}, Landroid/content/res/Resources;->getDisplayMetrics()Landroid/util/DisplayMetrics;

    move-result-object v0

    iput-object v0, p0, Lcom/brixd/niceapp/community/adapter/CommunityAppAdapter;->mMetrics:Landroid/util/DisplayMetrics;

    .line 43
    invoke-static {}, Lcom/nostra13/universalimageloader/core/ImageLoader;->getInstance()Lcom/nostra13/universalimageloader/core/ImageLoader;

    move-result-object v0

    iput-object v0, p0, Lcom/brixd/niceapp/community/adapter/CommunityAppAdapter;->mImageLoader:Lcom/nostra13/universalimageloader/core/ImageLoader;

    .line 44
    new-instance v0, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;

    invoke-direct {v0}, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;-><init>()V

    .line 45
    invoke-virtual {v0, v1}, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;->resetViewBeforeLoading(Z)Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;

    move-result-object v0

    invoke-virtual {v0, v1}, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;->cacheInMemory(Z)Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;

    move-result-object v0

    .line 46
    invoke-virtual {v0, v1}, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;->cacheOnDisc(Z)Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;

    move-result-object v0

    sget-object v1, Lcom/nostra13/universalimageloader/core/assist/ImageScaleType;->EXACTLY:Lcom/nostra13/universalimageloader/core/assist/ImageScaleType;

    invoke-virtual {v0, v1}, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;->imageScaleType(Lcom/nostra13/universalimageloader/core/assist/ImageScaleType;)Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;

    move-result-object v0

    sget-object v1, Landroid/graphics/Bitmap$Config;->RGB_565:Landroid/graphics/Bitmap$Config;

    .line 47
    invoke-virtual {v0, v1}, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;->bitmapConfig(Landroid/graphics/Bitmap$Config;)Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;

    move-result-object v0

    new-instance v1, Lcom/nostra13/universalimageloader/core/display/SimpleBitmapDisplayer;

    invoke-direct {v1}, Lcom/nostra13/universalimageloader/core/display/SimpleBitmapDisplayer;-><init>()V

    .line 48
    invoke-virtual {v0, v1}, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;->displayer(Lcom/nostra13/universalimageloader/core/display/BitmapDisplayer;)Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;

    move-result-object v0

    invoke-virtual {v0}, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;->build()Lcom/nostra13/universalimageloader/core/DisplayImageOptions;

    move-result-object v0

    iput-object v0, p0, Lcom/brixd/niceapp/community/adapter/CommunityAppAdapter;->mOptions:Lcom/nostra13/universalimageloader/core/DisplayImageOptions;

    .line 50
    new-instance v0, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;

    invoke-direct {v0}, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;-><init>()V

    iget-object v1, p0, Lcom/brixd/niceapp/community/adapter/CommunityAppAdapter;->mOptions:Lcom/nostra13/universalimageloader/core/DisplayImageOptions;

    invoke-virtual {v0, v1}, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;->cloneFrom(Lcom/nostra13/universalimageloader/core/DisplayImageOptions;)Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;

    move-result-object v0

    .line 51
    invoke-virtual {v0, v2}, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;->showImageOnFail(I)Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;

    move-result-object v0

    .line 52
    invoke-virtual {v0, v2}, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;->showImageOnLoading(I)Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;

    move-result-object v0

    .line 53
    invoke-virtual {v0, v2}, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;->showImageForEmptyUri(I)Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;

    move-result-object v0

    invoke-virtual {v0}, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;->build()Lcom/nostra13/universalimageloader/core/DisplayImageOptions;

    move-result-object v0

    iput-object v0, p0, Lcom/brixd/niceapp/community/adapter/CommunityAppAdapter;->mIconOptions:Lcom/nostra13/universalimageloader/core/DisplayImageOptions;

    .line 55
    new-instance v0, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;

    invoke-direct {v0}, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;-><init>()V

    iget-object v1, p0, Lcom/brixd/niceapp/community/adapter/CommunityAppAdapter;->mOptions:Lcom/nostra13/universalimageloader/core/DisplayImageOptions;

    invoke-virtual {v0, v1}, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;->cloneFrom(Lcom/nostra13/universalimageloader/core/DisplayImageOptions;)Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;

    move-result-object v0

    .line 56
    invoke-virtual {v0, v3}, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;->showImageOnFail(I)Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;

    move-result-object v0

    .line 57
    invoke-virtual {v0, v3}, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;->showImageOnLoading(I)Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;

    move-result-object v0

    .line 58
    invoke-virtual {v0, v3}, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;->showImageForEmptyUri(I)Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;

    move-result-object v0

    invoke-virtual {v0}, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;->build()Lcom/nostra13/universalimageloader/core/DisplayImageOptions;

    move-result-object v0

    iput-object v0, p0, Lcom/brixd/niceapp/community/adapter/CommunityAppAdapter;->mAvatarOptions:Lcom/nostra13/universalimageloader/core/DisplayImageOptions;

    .line 59
    return-void
.end method

.method static synthetic access$000(Lcom/brixd/niceapp/community/adapter/CommunityAppAdapter;)Lcom/brixd/niceapp/community/adapter/CommunityAppAdapter$OnItemClickListener;
    .registers 2
    .param p0, "x0"    # Lcom/brixd/niceapp/community/adapter/CommunityAppAdapter;

    .prologue
    .line 25
    iget-object v0, p0, Lcom/brixd/niceapp/community/adapter/CommunityAppAdapter;->mOnItemClickListener:Lcom/brixd/niceapp/community/adapter/CommunityAppAdapter$OnItemClickListener;

    return-object v0
.end method

.method private generateView()Landroid/view/View;
    .registers 11

    .prologue
    .line 109
    iget-object v7, p0, Lcom/brixd/niceapp/community/adapter/CommunityAppAdapter;->mContext:Landroid/content/Context;

    const v8, 0x7f030027

    const/4 v9, 0x0

    invoke-static {v7, v8, v9}, Landroid/view/View;->inflate(Landroid/content/Context;ILandroid/view/ViewGroup;)Landroid/view/View;

    move-result-object v6

    .line 110
    .local v6, "view":Landroid/view/View;
    new-instance v0, Lcom/brixd/niceapp/community/adapter/CommunityAppAdapter$ViewHolder;

    invoke-direct {v0, p0}, Lcom/brixd/niceapp/community/adapter/CommunityAppAdapter$ViewHolder;-><init>(Lcom/brixd/niceapp/community/adapter/CommunityAppAdapter;)V

    .line 111
    .local v0, "holder":Lcom/brixd/niceapp/community/adapter/CommunityAppAdapter$ViewHolder;
    const v7, 0x7f0a00bb

    invoke-virtual {v6, v7}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v7

    check-cast v7, Landroid/widget/ImageView;

    iput-object v7, v0, Lcom/brixd/niceapp/community/adapter/CommunityAppAdapter$ViewHolder;->headPortrait:Landroid/widget/ImageView;

    .line 112
    const v7, 0x7f0a00bc

    invoke-virtual {v6, v7}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v7

    check-cast v7, Landroid/widget/TextView;

    iput-object v7, v0, Lcom/brixd/niceapp/community/adapter/CommunityAppAdapter$ViewHolder;->author:Landroid/widget/TextView;

    .line 113
    const v7, 0x7f0a00bd

    invoke-virtual {v6, v7}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v7

    check-cast v7, Landroid/widget/TextView;

    iput-object v7, v0, Lcom/brixd/niceapp/community/adapter/CommunityAppAdapter$ViewHolder;->authorCareer:Landroid/widget/TextView;

    .line 114
    const v7, 0x7f0a00b3

    invoke-virtual {v6, v7}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v7

    check-cast v7, Landroid/widget/ImageView;

    iput-object v7, v0, Lcom/brixd/niceapp/community/adapter/CommunityAppAdapter$ViewHolder;->coverImage:Landroid/widget/ImageView;

    .line 115
    const v7, 0x7f0a002f

    invoke-virtual {v6, v7}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v7

    check-cast v7, Landroid/widget/ImageView;

    iput-object v7, v0, Lcom/brixd/niceapp/community/adapter/CommunityAppAdapter$ViewHolder;->iconImage:Landroid/widget/ImageView;

    .line 116
    const v7, 0x7f0a0034

    invoke-virtual {v6, v7}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v7

    check-cast v7, Landroid/widget/TextView;

    iput-object v7, v0, Lcom/brixd/niceapp/community/adapter/CommunityAppAdapter$ViewHolder;->title:Landroid/widget/TextView;

    .line 117
    const v7, 0x7f0a00bf

    invoke-virtual {v6, v7}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v7

    check-cast v7, Landroid/widget/TextView;

    iput-object v7, v0, Lcom/brixd/niceapp/community/adapter/CommunityAppAdapter$ViewHolder;->subTitle:Landroid/widget/TextView;

    .line 118
    const v7, 0x7f0a00c1

    invoke-virtual {v6, v7}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v7

    check-cast v7, Landroid/widget/TextView;

    iput-object v7, v0, Lcom/brixd/niceapp/community/adapter/CommunityAppAdapter$ViewHolder;->viewNum:Landroid/widget/TextView;

    .line 119
    const v7, 0x7f0a0096

    invoke-virtual {v6, v7}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v7

    check-cast v7, Landroid/widget/TextView;

    iput-object v7, v0, Lcom/brixd/niceapp/community/adapter/CommunityAppAdapter$ViewHolder;->upNum:Landroid/widget/TextView;

    .line 120
    const v7, 0x7f0a00c2

    invoke-virtual {v6, v7}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v7

    check-cast v7, Landroid/widget/TextView;

    iput-object v7, v0, Lcom/brixd/niceapp/community/adapter/CommunityAppAdapter$ViewHolder;->commentNum:Landroid/widget/TextView;

    .line 121
    const v7, 0x7f0a00ba

    invoke-virtual {v6, v7}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v7

    iput-object v7, v0, Lcom/brixd/niceapp/community/adapter/CommunityAppAdapter$ViewHolder;->userInfoBox:Landroid/view/View;

    .line 123
    iget-object v7, v0, Lcom/brixd/niceapp/community/adapter/CommunityAppAdapter$ViewHolder;->coverImage:Landroid/widget/ImageView;

    invoke-virtual {v7}, Landroid/widget/ImageView;->getLayoutParams()Landroid/view/ViewGroup$LayoutParams;

    move-result-object v4

    check-cast v4, Landroid/widget/FrameLayout$LayoutParams;

    .line 124
    .local v4, "params":Landroid/widget/FrameLayout$LayoutParams;
    iget-object v7, p0, Lcom/brixd/niceapp/community/adapter/CommunityAppAdapter;->mMetrics:Landroid/util/DisplayMetrics;

    iget v5, v7, Landroid/util/DisplayMetrics;->widthPixels:I

    .line 125
    .local v5, "screenWidth":I
    iget-object v7, p0, Lcom/brixd/niceapp/community/adapter/CommunityAppAdapter;->mContext:Landroid/content/Context;

    invoke-virtual {v7}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v7

    const v8, 0x7f090035

    invoke-virtual {v7, v8}, Landroid/content/res/Resources;->getDimensionPixelSize(I)I

    move-result v7

    iget-object v8, p0, Lcom/brixd/niceapp/community/adapter/CommunityAppAdapter;->mContext:Landroid/content/Context;

    .line 126
    invoke-virtual {v8}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v8

    const v9, 0x7f090036

    invoke-virtual {v8, v9}, Landroid/content/res/Resources;->getDimensionPixelSize(I)I

    move-result v8

    add-int v3, v7, v8

    .line 127
    .local v3, "marginOffset":I
    sub-int v2, v5, v3

    .line 128
    .local v2, "imageWidth":I
    int-to-float v7, v2

    const/high16 v8, 0x43a00000

    div-float/2addr v7, v8

    const/high16 v8, 0x43340000

    mul-float/2addr v7, v8

    float-to-int v1, v7

    .line 129
    .local v1, "imageHeight":I
    iput v1, v4, Landroid/widget/FrameLayout$LayoutParams;->height:I

    .line 130
    iput v2, v4, Landroid/widget/FrameLayout$LayoutParams;->width:I

    .line 132
    invoke-virtual {v6, v0}, Landroid/view/View;->setTag(Ljava/lang/Object;)V

    .line 133
    return-object v6
.end method

.method private initView(Lcom/brixd/niceapp/community/model/CommunityAppModel;Lcom/brixd/niceapp/community/adapter/CommunityAppAdapter$ViewHolder;)V
    .registers 9
    .param p1, "model"    # Lcom/brixd/niceapp/community/model/CommunityAppModel;
    .param p2, "holder"    # Lcom/brixd/niceapp/community/adapter/CommunityAppAdapter$ViewHolder;

    .prologue
    const/16 v3, 0x8

    const/4 v5, 0x0

    const/4 v4, 0x0

    .line 137
    iget-object v0, p2, Lcom/brixd/niceapp/community/adapter/CommunityAppAdapter$ViewHolder;->title:Landroid/widget/TextView;

    invoke-virtual {p1}, Lcom/brixd/niceapp/community/model/CommunityAppModel;->getTitle()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 138
    invoke-virtual {p1}, Lcom/brixd/niceapp/community/model/CommunityAppModel;->getSubTitle()Ljava/lang/String;

    move-result-object v0

    invoke-static {v0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v0

    if-eqz v0, :cond_120

    .line 139
    iget-object v0, p2, Lcom/brixd/niceapp/community/adapter/CommunityAppAdapter$ViewHolder;->subTitle:Landroid/widget/TextView;

    invoke-virtual {v0, v3}, Landroid/widget/TextView;->setVisibility(I)V

    .line 144
    :goto_1c
    iget-object v0, p2, Lcom/brixd/niceapp/community/adapter/CommunityAppAdapter$ViewHolder;->viewNum:Landroid/widget/TextView;

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, ""

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {p1}, Lcom/brixd/niceapp/community/model/CommunityAppModel;->getShowTimes()I

    move-result v2

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 145
    iget-object v0, p2, Lcom/brixd/niceapp/community/adapter/CommunityAppAdapter$ViewHolder;->upNum:Landroid/widget/TextView;

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, ""

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {p1}, Lcom/brixd/niceapp/community/model/CommunityAppModel;->getUpTimes()I

    move-result v2

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 146
    iget-object v0, p2, Lcom/brixd/niceapp/community/adapter/CommunityAppAdapter$ViewHolder;->commentNum:Landroid/widget/TextView;

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, ""

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {p1}, Lcom/brixd/niceapp/community/model/CommunityAppModel;->getCommentTimes()I

    move-result v2

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 148
    iget-object v0, p2, Lcom/brixd/niceapp/community/adapter/CommunityAppAdapter$ViewHolder;->viewNum:Landroid/widget/TextView;

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "show_"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {p1}, Lcom/brixd/niceapp/community/model/CommunityAppModel;->getId()I

    move-result v2

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setTag(Ljava/lang/Object;)V

    .line 149
    iget-object v0, p2, Lcom/brixd/niceapp/community/adapter/CommunityAppAdapter$ViewHolder;->upNum:Landroid/widget/TextView;

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "up_"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {p1}, Lcom/brixd/niceapp/community/model/CommunityAppModel;->getId()I

    move-result v2

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setTag(Ljava/lang/Object;)V

    .line 150
    iget-object v0, p2, Lcom/brixd/niceapp/community/adapter/CommunityAppAdapter$ViewHolder;->commentNum:Landroid/widget/TextView;

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "comment_"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {p1}, Lcom/brixd/niceapp/community/model/CommunityAppModel;->getId()I

    move-result v2

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setTag(Ljava/lang/Object;)V

    .line 152
    iget-boolean v0, p0, Lcom/brixd/niceapp/community/adapter/CommunityAppAdapter;->mIsHideUserInfo:Z

    if-nez v0, :cond_149

    .line 153
    iget-object v0, p2, Lcom/brixd/niceapp/community/adapter/CommunityAppAdapter$ViewHolder;->author:Landroid/widget/TextView;

    invoke-virtual {p1}, Lcom/brixd/niceapp/community/model/CommunityAppModel;->getAuthorName()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 154
    iget-object v0, p2, Lcom/brixd/niceapp/community/adapter/CommunityAppAdapter$ViewHolder;->authorCareer:Landroid/widget/TextView;

    invoke-virtual {p1}, Lcom/brixd/niceapp/community/model/CommunityAppModel;->getAuthorCareer()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 155
    iget-object v0, p0, Lcom/brixd/niceapp/community/adapter/CommunityAppAdapter;->mImageLoader:Lcom/nostra13/universalimageloader/core/ImageLoader;

    invoke-virtual {p1}, Lcom/brixd/niceapp/community/model/CommunityAppModel;->getAuthorAvatarUrl()Ljava/lang/String;

    move-result-object v1

    iget-object v2, p2, Lcom/brixd/niceapp/community/adapter/CommunityAppAdapter$ViewHolder;->headPortrait:Landroid/widget/ImageView;

    iget-object v3, p0, Lcom/brixd/niceapp/community/adapter/CommunityAppAdapter;->mAvatarOptions:Lcom/nostra13/universalimageloader/core/DisplayImageOptions;

    invoke-virtual {v0, v1, v2, v3}, Lcom/nostra13/universalimageloader/core/ImageLoader;->displayImage(Ljava/lang/String;Landroid/widget/ImageView;Lcom/nostra13/universalimageloader/core/DisplayImageOptions;)V

    .line 156
    iget-object v0, p2, Lcom/brixd/niceapp/community/adapter/CommunityAppAdapter$ViewHolder;->userInfoBox:Landroid/view/View;

    invoke-virtual {v0, v5}, Landroid/view/View;->setVisibility(I)V

    .line 158
    invoke-virtual {p1}, Lcom/brixd/niceapp/community/model/CommunityAppModel;->getAuthorIdentity()I

    move-result v0

    const/4 v1, 0x1

    if-ne v0, v1, :cond_143

    .line 159
    iget-object v0, p2, Lcom/brixd/niceapp/community/adapter/CommunityAppAdapter$ViewHolder;->author:Landroid/widget/TextView;

    iget-object v1, p0, Lcom/brixd/niceapp/community/adapter/CommunityAppAdapter;->mContext:Landroid/content/Context;

    invoke-virtual {v1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v1

    const v2, 0x7f02018a

    invoke-virtual {v1, v2}, Landroid/content/res/Resources;->getDrawable(I)Landroid/graphics/drawable/Drawable;

    move-result-object v1

    invoke-virtual {v0, v4, v4, v1, v4}, Landroid/widget/TextView;->setCompoundDrawablesWithIntrinsicBounds(Landroid/graphics/drawable/Drawable;Landroid/graphics/drawable/Drawable;Landroid/graphics/drawable/Drawable;Landroid/graphics/drawable/Drawable;)V

    .line 167
    :goto_105
    iget-object v0, p0, Lcom/brixd/niceapp/community/adapter/CommunityAppAdapter;->mImageLoader:Lcom/nostra13/universalimageloader/core/ImageLoader;

    invoke-virtual {p1}, Lcom/brixd/niceapp/community/model/CommunityAppModel;->getIconUrl()Ljava/lang/String;

    move-result-object v1

    iget-object v2, p2, Lcom/brixd/niceapp/community/adapter/CommunityAppAdapter$ViewHolder;->iconImage:Landroid/widget/ImageView;

    iget-object v3, p0, Lcom/brixd/niceapp/community/adapter/CommunityAppAdapter;->mIconOptions:Lcom/nostra13/universalimageloader/core/DisplayImageOptions;

    invoke-virtual {v0, v1, v2, v3}, Lcom/nostra13/universalimageloader/core/ImageLoader;->displayImage(Ljava/lang/String;Landroid/widget/ImageView;Lcom/nostra13/universalimageloader/core/DisplayImageOptions;)V

    .line 168
    iget-object v0, p0, Lcom/brixd/niceapp/community/adapter/CommunityAppAdapter;->mImageLoader:Lcom/nostra13/universalimageloader/core/ImageLoader;

    invoke-virtual {p1}, Lcom/brixd/niceapp/community/model/CommunityAppModel;->getCoverImageUrl()Ljava/lang/String;

    move-result-object v1

    iget-object v2, p2, Lcom/brixd/niceapp/community/adapter/CommunityAppAdapter$ViewHolder;->coverImage:Landroid/widget/ImageView;

    iget-object v3, p0, Lcom/brixd/niceapp/community/adapter/CommunityAppAdapter;->mOptions:Lcom/nostra13/universalimageloader/core/DisplayImageOptions;

    invoke-virtual {v0, v1, v2, v3}, Lcom/nostra13/universalimageloader/core/ImageLoader;->displayImage(Ljava/lang/String;Landroid/widget/ImageView;Lcom/nostra13/universalimageloader/core/DisplayImageOptions;)V

    .line 169
    return-void

    .line 141
    :cond_120
    iget-object v0, p2, Lcom/brixd/niceapp/community/adapter/CommunityAppAdapter$ViewHolder;->subTitle:Landroid/widget/TextView;

    invoke-virtual {v0, v5}, Landroid/widget/TextView;->setVisibility(I)V

    .line 142
    iget-object v0, p2, Lcom/brixd/niceapp/community/adapter/CommunityAppAdapter$ViewHolder;->subTitle:Landroid/widget/TextView;

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {p1}, Lcom/brixd/niceapp/community/model/CommunityAppModel;->getSubTitle()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string v2, ""

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    goto/16 :goto_1c

    .line 161
    :cond_143
    iget-object v0, p2, Lcom/brixd/niceapp/community/adapter/CommunityAppAdapter$ViewHolder;->author:Landroid/widget/TextView;

    invoke-virtual {v0, v4, v4, v4, v4}, Landroid/widget/TextView;->setCompoundDrawablesWithIntrinsicBounds(Landroid/graphics/drawable/Drawable;Landroid/graphics/drawable/Drawable;Landroid/graphics/drawable/Drawable;Landroid/graphics/drawable/Drawable;)V

    goto :goto_105

    .line 164
    :cond_149
    iget-object v0, p2, Lcom/brixd/niceapp/community/adapter/CommunityAppAdapter$ViewHolder;->userInfoBox:Landroid/view/View;

    invoke-virtual {v0, v3}, Landroid/view/View;->setVisibility(I)V

    goto :goto_105
.end method


# virtual methods
.method public getCount()I
    .registers 2

    .prologue
    .line 73
    iget-object v0, p0, Lcom/brixd/niceapp/community/adapter/CommunityAppAdapter;->mModels:Ljava/util/ArrayList;

    invoke-virtual {v0}, Ljava/util/ArrayList;->size()I

    move-result v0

    return v0
.end method

.method public getItem(I)Ljava/lang/Object;
    .registers 3
    .param p1, "position"    # I

    .prologue
    .line 78
    iget-object v0, p0, Lcom/brixd/niceapp/community/adapter/CommunityAppAdapter;->mModels:Ljava/util/ArrayList;

    invoke-virtual {v0, p1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v0

    return-object v0
.end method

.method public getItemId(I)J
    .registers 4
    .param p1, "position"    # I

    .prologue
    .line 83
    int-to-long v0, p1

    return-wide v0
.end method

.method public getItemViewType(I)I
    .registers 3
    .param p1, "position"    # I

    .prologue
    .line 63
    iget-object v0, p0, Lcom/brixd/niceapp/community/adapter/CommunityAppAdapter;->mModels:Ljava/util/ArrayList;

    invoke-virtual {v0, p1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/brixd/niceapp/community/model/CommunityAppModel;

    invoke-virtual {v0}, Lcom/brixd/niceapp/community/model/CommunityAppModel;->getType()Lcom/brixd/niceapp/community/model/CommunityAppModel$AdapterType;

    move-result-object v0

    invoke-virtual {v0}, Lcom/brixd/niceapp/community/model/CommunityAppModel$AdapterType;->ordinal()I

    move-result v0

    return v0
.end method

.method public getView(ILandroid/view/View;Landroid/view/ViewGroup;)Landroid/view/View;
    .registers 7
    .param p1, "position"    # I
    .param p2, "view"    # Landroid/view/View;
    .param p3, "parent"    # Landroid/view/ViewGroup;

    .prologue
    .line 89
    iget-object v2, p0, Lcom/brixd/niceapp/community/adapter/CommunityAppAdapter;->mModels:Ljava/util/ArrayList;

    invoke-virtual {v2, p1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Lcom/brixd/niceapp/community/model/CommunityAppModel;

    .line 90
    .local v1, "model":Lcom/brixd/niceapp/community/model/CommunityAppModel;
    if-nez p2, :cond_e

    .line 91
    invoke-direct {p0}, Lcom/brixd/niceapp/community/adapter/CommunityAppAdapter;->generateView()Landroid/view/View;

    move-result-object p2

    .line 94
    :cond_e
    invoke-virtual {p2}, Landroid/view/View;->getTag()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/brixd/niceapp/community/adapter/CommunityAppAdapter$ViewHolder;

    .line 95
    .local v0, "holder":Lcom/brixd/niceapp/community/adapter/CommunityAppAdapter$ViewHolder;
    invoke-direct {p0, v1, v0}, Lcom/brixd/niceapp/community/adapter/CommunityAppAdapter;->initView(Lcom/brixd/niceapp/community/model/CommunityAppModel;Lcom/brixd/niceapp/community/adapter/CommunityAppAdapter$ViewHolder;)V

    .line 97
    new-instance v2, Lcom/brixd/niceapp/community/adapter/CommunityAppAdapter$1;

    invoke-direct {v2, p0, p1}, Lcom/brixd/niceapp/community/adapter/CommunityAppAdapter$1;-><init>(Lcom/brixd/niceapp/community/adapter/CommunityAppAdapter;I)V

    invoke-virtual {p2, v2}, Landroid/view/View;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 105
    return-object p2
.end method

.method public getViewTypeCount()I
    .registers 2

    .prologue
    .line 68
    invoke-static {}, Lcom/brixd/niceapp/community/model/CommunityAppModel$AdapterType;->values()[Lcom/brixd/niceapp/community/model/CommunityAppModel$AdapterType;

    move-result-object v0

    array-length v0, v0

    return v0
.end method

.method public setHideUserInfo(Z)V
    .registers 2
    .param p1, "isHideUserInfo"    # Z

    .prologue
    .line 176
    iput-boolean p1, p0, Lcom/brixd/niceapp/community/adapter/CommunityAppAdapter;->mIsHideUserInfo:Z

    .line 177
    return-void
.end method

.method public setOnItemClickListener(Lcom/brixd/niceapp/community/adapter/CommunityAppAdapter$OnItemClickListener;)V
    .registers 2
    .param p1, "listener"    # Lcom/brixd/niceapp/community/adapter/CommunityAppAdapter$OnItemClickListener;

    .prologue
    .line 172
    iput-object p1, p0, Lcom/brixd/niceapp/community/adapter/CommunityAppAdapter;->mOnItemClickListener:Lcom/brixd/niceapp/community/adapter/CommunityAppAdapter$OnItemClickListener;

    .line 173
    return-void
.end method
